<admintpl file="header" />
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class=""><a href="{:U('comment/commentadmin/judge_list', array('post_id' => $post_id))}" target="_self">审核信息列表</a></li>
        <li class="active"><a>添加审核</a></li>
    </ul>
    <form action="{:U('Commentadmin/edit_judge', array('comment_id' => $comment_id, 'post_id' => $post_id))}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">

        <div class="row-fluid">
            <div class="span9">
                <table class="table table-bordered">
                    <input name="content" value="{$judge_info['content']}" style="display: none">
                    <tr>
                        <th width="80">原因</th>
                        <td>
                            <input id="reason" style="width: 100%" value="{$judge_info ? $judge_info['reason'] : ''}">
                        </td>
                    </tr>
                    <tr>
                        <th width="80">修改建议</th>
                        <td>
                            <textarea id="suggest" style="width: 500px;height: 200px;">{$judge_info ? $judge_info['suggest'] : ''}</textarea>
                        </td>
                    </tr>

                    <tr>
                        <th width="80">状态</th>
                        <td>
                            <select name="status" id="status">
                                <option value="1" {$judge_info['status'] == 1 ? "selected" : ''}>正常</option>
                                <option value="2" {$judge_info['status'] == 2 ? "selected" : ''}>删除</option>
                                <option value="3" {$judge_info['status'] == 3 ? "selected" : ''}>已修改</option>
                            </select>
                        </td>
                    </tr>
                </table>
            </div>
        </div>

        <div class="form-actions">
            <button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
            <a class="btn" href="javascript:window.history.go(-1);">返回</a>
        </div>

    </form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script>
    $(document).ready(function () {
        $('#reason').change(function () {
            var content = $(this).val() + "||" + $('#suggest').val();
            $('[name="content"]').val(content);
        });

        $('#suggest').change(function () {
            var content = $('#reason').val() + "||" + $(this).val();
            $('[name="content"]').val(content);
        })
    })
</script>
</body>
</html>